#ifndef _RASTER_CAMERA_H_
#define _RASTER_CAMERA_H_

#include "camera.h"
#include "sdl_event.h"
#include "shader.h"


class RasterCamera
	: public Camera
	, public sdl::EventListener
{
public:
	RasterCamera(const glm::vec3& pos, float focal = 0.f);

	// Vertex shader
	const Shader& getVertexShader() const {
		return _shader;
	}

private:
	void on(EventListener::KeyPressed, const Uint8*) throw();

	class VertexShader : public Shader {
	public:
		VertexShader(Camera* cam) : _cam(cam) { }
		void transform(const glm::vec3& in, glm::vec3* out) const;
	private:
		const Camera* _cam;
	};

	VertexShader _shader;
};

#endif // _RASTER_CAMERA_H_

